<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:outputStylesheet library="css" name="default.css"/>
    <h:head>
        <title>Mantenimiento Alumnos</title>
    </h:head>
    <h:body>
        <h:form id="formAlu">
            <p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
            <h:panelGrid columns="4" columnClasses="alinder,alinizq,alinder,alinizq">
                <p:outputLabel value="Id " for="al001" styleClass="requiredLbl"/>
                <p:inputText value="#{ctrAlumnos.activeReg.ccodigo}" id="al001" label="Identificador" size="10"
                                 disabled="#{not ctrAlumnos.lnuevo}" required="true"  >
                        <f:validateLength maximum="10" />
                </p:inputText>
                <h:panelGroup/><h:panelGroup/>
          
                <p:outputLabel value=" Nombre" for="al002" styleClass="requiredLbl"/>
                <p:inputText value="#{ctrAlumnos.activeReg.cnombre}" id="al002" label="Nombre" size="30" required="true">
                    <f:validateLength maximum="30" />
                 </p:inputText>
             
                <p:outputLabel value=" Apellidos" for="al003" styleClass="requiredLbl"/>
                <p:inputText value="#{ctrAlumnos.activeReg.capellidos}" id="al003" size="30" required="true" >
                    <f:validateLength maximum="30" />
                 </p:inputText>
             
                <p:outputLabel value="Dirección" for="al004" styleClass="optionalLbl" />
                <p:inputText value="#{ctrAlumnos.activeReg.cdireccion}" id="al004" label="Apellidos" size="40">
                    <f:validateLength maximum="40" />
                 </p:inputText>
            
                <p:outputLabel value="Teléfono" for="al005" styleClass="optionalLbl"  />
                <p:inputText value="#{ctrAlumnos.activeReg.ctelefono}" id="al005" size="10">
                    <f:validateLength maximum="10" />
                </p:inputText>
              
                <p:outputLabel value=" E-mail" for="al006" styleClass="requiredLbl"  />
                <p:inputText value="#{ctrAlumnos.activeReg.cmail}"  id="al006" required="true" label="mail" size="40">
                    <f:validateLength maximum="40" />
                    <f:validator validatorId="emailValidator" />
                </p:inputText>
                
                <h:panelGroup/><h:panelGroup/>
                
                  
               
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>       
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                <p:commandButton actionListener="#{ctrAlumnos.save}" value="Save" id="saveAlu"  />
                <p:commandButton actionListener="#{ctrAlumnos.delete}" value="Delete" id="delAlu" rendered="#{not ctrAlumnos.lnuevo}">
                       <p:confirm header="Confirmación" message="¿Esta seguro que quiere borrar este alumno?" icon="ui-icon-alert" />
                </p:commandButton>
 
                <p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
                    <p:commandButton value="Si" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
                    <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
                </p:confirmDialog>
           </h:panelGrid>

         </h:form>
    </h:body>
</html>

